package cn.lopr.im.android.bean;

public class Option {

    public enum OptionType {
        VISIT(1, "visit"),
        LIKE(2, "like"),
        COMMENT(3, "comment");

        int code;
        String desc;

        OptionType(int code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public int getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }

        public static String getDescByCode(int errorCode) {
            for (OptionType value : values()) {
                if (value.code == errorCode) {
                    return value.desc;
                }
            }
            return null;
        }
    }

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column option.id
     *
     * @mbg.generated Sat May 22 12:16:15 CST 2021
     */
    private String id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column option.type
     *
     * @mbg.generated Sat May 22 12:16:15 CST 2021
     */
    private Integer type;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column option.id
     *
     * @return the value of option.id
     * @mbg.generated Sat May 22 12:16:15 CST 2021
     */
    public String getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column option.id
     *
     * @param id the value for option.id
     * @mbg.generated Sat May 22 12:16:15 CST 2021
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column option.type
     *
     * @return the value of option.type
     * @mbg.generated Sat May 22 12:16:15 CST 2021
     */
    public Integer getType() {
        return type;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column option.type
     *
     * @param type the value for option.type
     * @mbg.generated Sat May 22 12:16:15 CST 2021
     */
    public void setType(Integer type) {
        this.type = type;
    }
}